#include <hal_configer.h>
#include "hal_eeprom.h"
#include "sys_log.h"
#include <hal_move.h>

static uint8_t MoveStartFlag = MOVE_STATUES_NONE;

void MotorInit()
{
    SLOG_I("motor MotorInit start \t\r\n");

    // 初始化电机EEPROM获取信息
    hal_AllMotorEEPromInformInit();
    SLOG_I("motor hal_AllMotorEEPromInformInit end \t\r\n");

    //初始化AD7689
    for (uint8_t i = 1; i <= 4; i++)
    {
        HAL_AD7689_Init(i, 1);
    }
    SLOG_I("motor MotorInit HAL_AD7689_Init end \t\r\n");
}

void hal_MotorMoveStartFlagSet(uint8_t MoveStatues) { MoveStartFlag = MoveStatues; }

uint8_t hal_MotorMoveStartFlagGet() { return MoveStartFlag; }
